<template>
  <div>
    <h1>班主任列表</h1>
    <ul>
      <li v-for="item in all" :key="item._id">{{ item.name }}</li>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      all: [],
    };
  },
  methods: {
    async getAllDirections() {
      const {
        data: {
          data: { rows },
        },
      } = await this.$api.directions.getDirectors();
      this.all = rows;
    },
  },
  created() {
    this.getAllDirections();
  },
};
</script>

<style>
</style>